//
//  LNHConfirmOrderCell0.m
//  LNH
//
//  Created by cruise on 2018/2/15.
//  Copyright © 2018年 twentylx. All rights reserved.
//

#import "LNHConfirmOrderCell0.h"

@implementation LNHConfirmOrderCell0

-(instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.contentLabel];
        [self.contentView addSubview:self.contentTextField];
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.contentView);
            make.left.equalTo(self.contentView).offset(15);
            make.right.equalTo(self.contentLabel.mas_left);
            make.height.mas_equalTo(20);
        }];
        
        [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).offset(10);
            make.bottom.equalTo(self.contentView).offset(-10);
            make.left.equalTo(self.titleLabel.mas_right).priorityHigh();
            make.right.equalTo(self.contentView).offset(-15);
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-5);
        }];
        
        [self.contentTextField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).offset(10);
            make.bottom.equalTo(self.contentView).offset(-10);
            make.left.equalTo(self.titleLabel.mas_right).priorityHigh();
            make.right.equalTo(self.contentView).offset(-15);
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-5);
        }];
        
        
    }
    return self;
}

-(UILabel *) titleLabel {
    if (!_titleLabel) {
        _titleLabel = [UILabel new];
        [_titleLabel setFont:[UIFont systemFontOfSize:14]];
        [_titleLabel setTextColor:RGBCOLOR(35,24,21)];
    }
    return _titleLabel;
}

-(UILabel *) contentLabel {
    if (!_contentLabel) {
        _contentLabel = [UILabel new];
        [_contentLabel setFont:[UIFont systemFontOfSize:14]];
        [_contentLabel setTextColor:RGBCOLOR(35,24,21)];
        [_contentLabel setTextAlignment:NSTextAlignmentRight];
    }
    return _contentLabel;
}

- (UITextField *)contentTextField {
    if (!_contentTextField) {
        _contentTextField = [UITextField new];
        _contentTextField.placeholder = @"留言给我们";
        _contentTextField.font = [UIFont systemFontOfSize:14];
        _contentTextField.textColor = RGBCOLOR(35, 24, 21);
        _contentTextField.hidden = YES;
    }
    return _contentTextField;
}

@end
